#ifndef TODOPARSER_H
#define TODOPARSER_H

#include <QObject>
#include "todomanager.h"
#include "todoitem.h"

class TodoParser : public QObject
{
    Q_OBJECT
public:
    explicit TodoParser(TodoManager &manager, QObject *parent = 0);

    bool parseFile(QString fileName);
    void parseText(QString data);
    TodoItemPtr parseLine(QString line);
    bool saveFile(QString fileName);

protected:
    QString _generateLine(TodoItemPtr item);

signals:

public slots:

private:

    TodoManager &_manager;

};

#endif // TODOPARSER_H
